package lishizheng.demo03;

public class TestLambda02 {


    public static void main(String[] args) {

        ILove love = (int a) ->{
            System.out.println("I love you" + a);
        };
        love.love(2);

        //简化1：参数类型
        love = (a) ->{
            System.out.println("I Love you " +a);
        };

        //简化2：括号
        love = a -> {
            System.out.println("I love you " + a);
        };
        love.love(521);
        //简化3：去掉花括号
        love = a -> System.out.println("I love you" + a);
        love.love(1314);

    }
}

interface ILove{
    void love(int a);
}

